import Vue from 'vue'
import VueRouter from 'vue-router'
import home from '../view/home.vue'
import comment from '../view/comment.vue'
import search from '../view/search.vue'

Vue.use(VueRouter)

const routes = [{
        path: '/',
        redirect: '/home'
    },
    {
        path: '/home',
        component: home,
        meta: {
            title: '首页'
        }
    },
    {
        path: '/comment',
        component: comment,
        meta: {
            title: '评论'
        }
    },
    {
        path: '/search',
        component: search,
        meta: {
            title: '搜索'
        }
    }
]
const router = new VueRouter({
    routes
})

export default router